1. Field of the Invention
The present invention relates to a method and a system for generating or changing a structured document, a display rule and a document type definition, and a storage medium therefor. In particular, the present invention can be effectively employed for a technique for referring to the history for an editing operation on a screen, and for automatically generating examples for an display rule, a document type definition and a structured document.
2. Related Art
A structured document exhibiting a superior compatibility with documents or data for computer systems or with computer networks has been focused on. In the structured document, the elements (data) provide their own explanation (are self-descriptive), and the relationship that is established between the elements is described using a document type definition. The self-defining nature of the document elements (data) enables users not only to read the document, but also reproduces the characteristic of the structured document so that an application program running on a computer can understand the definition and the contents of the data. For example, one advantage is that electronic transaction data using a web can be precisely described.
An example structured document is an XML (eXtensible Markup Language) document or an SGML (Standard Generalized Markup Language) document. XML is one of the data description languages that provides improved processing performance by simplifying the SGML grammar definitions and enhances its employment for a network. In both XML and SGML, either the DTD (Document Type Definition) or the XML Schema is employed to define document types and to structure documents.
In a structured document, such as an XML document, the relationship established between the individual elements of the document is written as a structure, and information concerning style, how the document should be represented visually, is not included. Therefore, a display rule for the visual representation of the document must be defined separately from the structured document. Generally, however, since a display rule for a structured document must written using a formatting language, it is difficult for a user to personally perform this task. Thus, a demand has arisen for a system that can easily generate display rules.
Well known methods used for generating display rules are, for example, one that indicates what procedures must be applied to generate a display rule at a specific level. Examples of such methods are the “XML Style Wizard,” which is described in the “World-wide Free Distribution of the ‘XML Style Wizard’ that easily generates Inforteria and XSL documents,” September 1999, and “Visual XML Creation,” which is described in “Visual XML Transformation Tool,” International Business Machines Corp., Armonk, N.Y., December, 1999.
Well known systems for editing display rules are, for example: the “XSL Editor” (“XSL Editor,” International Business Machines, Corp., Armonk, N.Y., November, 1999, http://www.alphaworks.ibm.com/tech/xsleditor); the “XML Styler” (“XML Styler,” ArborText Corp., 1998, http://www.arbortext.com/index.html); and the “eXcelon Stylis” (“Object Design Announces eXcelon 2.0, Industry's First XML Application Development Environment for e-Business,” Object Design Inc., Burlington, Mass., October 1999, http://www.odi.com/excelon/Products/ProdMain.htm).
As an example display rule generation system, there is one system that, to generate a display rule, performs a document type transformation: the “Visual XML Transformation” (“XSL Editor,” International Business Machines, Corp., Armonk, N.Y., November, 1999).
In addition, the “XML Translation Generator (XTransGen)” (“XSL Editor,” International Business Machines Corp., Armonk, N.Y., November, 1999) is a well known method for providing two structured documents and for generating a translator for the two.
For a programming method that uses exemplification, generally, the technique that is next discussed is well known. It should be noted that exemplification programming is a general term used for a technique whereby collected samples are employed to automatically synthesize general operating procedures.
A method called automatic program synthesis is described in “Automatic Program Synthesis From Examples,” Siklossy L. and Sykes D., Proc. of the Fourth International Joint Conference on Artificial Intelligence (IJCAI), Tbilisi, USSR, September, 1975, pp. 268-273. With the automatic program synthesis method, the developer of the program does not instruct the procedures that are to be used, but instead provides for a machine a combination of input and output to obtain a machine that can transform such input/output.
A method whereby programming is performed by demonstration is described in “Pygmalion: A Computer Program To Model And Stimulate Creative Thought,” Smith D., Birkhauser, Easel, 1977; or in “Pygmalion: A Creative Programming Environment,” Smith D., Report No. STAN-CS-75-499, Department of Computer Science, Stanford University 1975. According to this programming by demonstration method, a programmer performs a specific operation that a machine is intended to provide as a function, so that the machine, by repeating the specific operation, can extract a generally applicable operation.
Another programming by demonstration method is described in “Teaching A Mouse How to Draw,” Maulsby D. and Witten I., Proceedings Of Graphics Interface '89, NCCGA, London Ontario, June 1989, pp. 130-137. According to this method, a metaphor of a professor is adopted to describe programming by demonstration, and the basic idea is expanded so as to provide generalized information.
In addition, a system whereby programming examples are adopted for use is described in “Watch What I Do,” Cypher Allen (ed.), MIT Press, Cambridge, Mass., 1993.
However, using the conventional methods, only a simple display rule can be generated, and unless a user is well versed in the use of a pertinent description language, generating a complicated display rule is difficult.
Specifically, according to the conventional art, a display rule can be automatically generated by using either the “XML Style Wizard” or “Visual XML Creation.” However, in this case, only a simple display rule can be generated; a detailed display rule can not be produced in response to a request by a user. To create a detailed display rule, a user must understand a formatting language and be able to edit a simple display rule. And although display rule editing systems are available, when such a system is used to change a simple display rule into a more complicated one, an editing tool, such as the “XSL Editor,” must be employed. Thus, while systems are available that can be used for editing display rules, writing one still requires knowledge of a formatting language.
Therefore, there is a demand for a system that can automatically generate a complicated display rule, without a user being required to directly edit the rule. There especially is a demand for a system that can automatically generate a display rule and that requires that a user merely perform an exemplary editing operation while viewing a display screen. With this system, a useful and convenient display rule generation means would be provided a user, but there would be no need for the user to be conversant with the usage of the language employed to write a display rule. Further, this system would automatically generate a display rule by reflecting the exemplary editing operations performed by a user, who, to obtain a desirable display rule, must merely perform a series of editing operations that are successively presented on a display screen. Thus, since a display rule would be automatically generated at the same time as the editing operations were displayed, a very useful system would be provided for a user.
In the same manner, when “Visual XML Transformation” was employed, a display rule could be generated by the transformation that was performed for the document type definition, without requiring that a user be conversant with the employment of the description language used for the display rule. However, according to this method, a user could not change a display rule while visually confirming the resultant document.
The above described programming methods for which exemplification would be used are provided merely as background information concerning the automatic generation of display rules by a general program for which examples are used. No technique based on an exemplary operation for automatically generating a display rule for a structured document has previously been disclosed.